<template>
  <div class="card" @click="taskCard">
    <div>
      <span>推送编号：</span>
      <span>SF123445657899</span>
      <img src="@/assets/images/copy.png" alt="" />
    </div>
    <van-divider />
    <div class="card-bottom">
      <div class="card-bottom-tit">提供电子大屏及话筒等配套设备</div>
      <div class="card-bottom-con">
        <div class="left">供给方</div>
        <div class="right">XCMG徐工集团</div>
      </div>
      <div class="card-bottom-bt">
        <div>
          <span>任务生成时间：</span>
          <span>2024-08-10</span>
          <span>14:25:23</span>
        </div>
        <div>
          <van-button type="primary" class="btn" @click="taskBtn"
            >去处理</van-button
          >
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from "vue-router";
const router = useRouter();
const taskCard = () => {
  router.push("/task/details");
};
// 点击
const taskBtn = (event) => {
  event.stopPropagation();
  router.push({
    path: "/task/details",
    query: { type: "handle" },
  });
};
</script>

<style lang="scss" scoped>
.card {
  background-color: white;
  padding: 16px;
  border-radius: 3px;
  font-size: 13px;
  &-bottom {
    &-tit {
      font-weight: 500;
      font-size: 17px;
      color: #1d2129;
      margin-bottom: 8px;
    }
    &-con {
      display: flex;
      .left {
        min-width: none;
        min-height: 10px;
        padding: 2px;
        border: 1px solid #4795ff;
        border-radius: 3px;
        font-size: 10px;
        color: #4795ff;
        margin-right: 3px;
      }
      margin-bottom: 8px;
    }
    &-bt {
      display: flex;
      justify-content: space-between;
      align-items: center;
      .btn {
        min-width: none;
        height: 30px;
        padding: 7px 12px 7px 12px;
        border-radius: 13px;
      }
    }
  }
}
</style>

